package defectsim.integrator.velocitylaw;

import javax.vecmath.Vector2d;

import defectsim.SimulationEnvironment;
import defectsim.agents.Dislocation;

public class DampingVelocity implements VelocityLaw {

	private SimulationEnvironment environment = SimulationEnvironment.getInstance();
	
	@Override
	public Vector2d getVelocity(Dislocation da, Vector2d force) {
		return new Vector2d(force.x / environment.getMaterial().getDampingCoefficientForGlide(), 
							force.y / environment.getMaterial().getDampingCoefficientForClimb());
	}

}
